<template>
  <div>
    <div>
      <el-breadcrumb separator="/">
        <el-breadcrumb-item v-for="(item, index) in $route.meta" :key="index">
          <router-link :to="item.url" v-if="item.url">{{
            item.name
          }}</router-link>
          <a v-else>{{ item.name }}</a>
        </el-breadcrumb-item>
      </el-breadcrumb>
    </div>
  </div>
</template>

<script>
// 是基于element-ui 面包屑导航的二次封装
import { Breadcrumb, BreadcrumbItem } from "element-ui";
export default {
  components: {
    "el-breadcrumb": Breadcrumb,
    "el-breadcrumb-item": BreadcrumbItem,
  },
};
</script>

<style lang="scss" scoped>
</style>